package com.icebartech.core.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import com.alibaba.fastjson.JSON;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 返回的json数据对象
 * @author haosheng.wenhs
 *
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "RespJson", description = "返回的json数据对象")
public class RespJson<T> {
    
    @ApiModelProperty(value = "返回码，200：成功；500：失败；401：未登录", example = "200")
    private int status;
    
    @ApiModelProperty(value = "提示信息", example = "成功")
    private String msg;
    
    @ApiModelProperty(value = "业务返回数据")
    private T data;
    
    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
    
}
